# Makefile for CSmartPtr
# ----------------------------------------------
# Author : Woo-Hyun Kim
# E-mail : woorung@nhncorp.com
# Date : Aug. 7, 2008
include ../../etc/profile.mk

#DEFS = -Wno-deprecated

#all : smart_ptr lib lib-allinone smart_ptr_test 
all : smart_ptr_test 

smart_ptr : CSmartPtr.o

smart_ptr_test : smart_ptr_test.cpp
	g++ $(DEFS) -o $@ $< $(WNL)/libcommon.a -I$(WNI)

CSmartPtr.o : CSmartPtr.cpp
	g++ $(DEFS) -c $< -I$(WNI) -Wno-deprecated -D_REENTRANT

lib :
	ar -ruv $(WNL)/libcommon.a CSmartPtr.o 
	ranlib $(WNL)/libcommon.a
	cp CRefCount.h $(WNI)/
	cp CSmartPtr.h $(WNI)/
	@echo libcommon.a completed.

lib-allinone :
	ar -ruv $(WNL)/libwn-allinone.a CSmartPtr.o 
	ranlib $(WNL)/libwn-allinone.a
	@echo libwn-allinone.a completed.

clean :
	\rm -f *.o smart_ptr_test 
